package com.koron.car.web.driver.bean.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.koron.car.web.common.DeleteFlag;
import com.koron.car.web.common.UpdateParameter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("司机台账")
public class Driver implements Serializable, UpdateParameter, DeleteFlag {

    private static final long serialVersionUID = 374385763916198430L;

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("司机关联的系统账号")
    private String account;

    @ApiModelProperty("姓名")
    private String driverName;

    @ApiModelProperty("驾驶员类型，字典（driver_type）：兼职、专职")
    private String driverType;

    @ApiModelProperty("性别，字典（sex_type）：男、女")
    private String sex;

    @ApiModelProperty("联系方式")
    private String phone;

    @ApiModelProperty("出生日期，格式：yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date birthday;

    @ApiModelProperty("驾驶证号码")
    private String licenseNumber;

    @ApiModelProperty("字典：驾驶证类型（license_type）：A1、A2、A3、B1、B2")
    private String licenseType;

    @ApiModelProperty("首次取证时间，格式：yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date earliestCertificate;

    @ApiModelProperty("驾驶证有效期，格式：yyyy-MM-dd，过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date licenseValidity;

    @ApiModelProperty("驾龄，最多保留一位小数")
    private Double driverYear;

    @ApiModelProperty("所属车队，所属车队id(新建即保存或新增)")
    private String motorcade;

    @ApiModelProperty("车队名称")
    private String motorcadeName;

    @ApiModelProperty("准驾车型，字典")
    private String vehicleModel;

    @ApiModelProperty("工作状态，字典（driver_work_state）：空闲、出车中、离线")
    private String workState;

    @ApiModelProperty(value = "创建人账号")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人账号")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "部门")
    private String deptId;

    @JsonIgnore
    @ApiModelProperty(value = "删除标志", hidden = true)
    private Boolean deleteFlag;

    @ApiModelProperty(value = "批准人id")
    private String approveId;

    @ApiModelProperty(value = "批准人姓名")
    private String approveName;

    @ApiModelProperty(value = "批准时间")
    private Date approveTime;
}
